import numpy as np

class NumArray:

    def __init__(self, nums: List[int]):
        self.array = np.array(nums)


    def update(self, index: int, val: int) -> None:
        if index < len(self.array):
            self.array[index] = val


    def sumRange(self, left: int, right: int) -> int:
        ret = 0
        sub = self.array[left: right + 1]
        return int(np.sum(sub))
